package com.jiejie.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author 辰广
 * @since 2022-10-05
 */
@Document(indexName="movie")
public class Movie implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 电影id
     */
    @TableId(value = "movie_id", type = IdType.AUTO)
    @Id
    private Integer movieId;

    /**
     * 电影中文名称
     */
    @Field(type = FieldType.Text,analyzer = "ik_smart",searchAnalyzer = "ik_max_word")//设置为text  可以分词
    private String movieCname;

    /**
     * 电影英文名称
     */
    @Field(type = FieldType.Text,analyzer = "ik_smart",searchAnalyzer = "ik_max_word")//设置为text  可以分词
    private String movieEname;

    /**
     * 电影类型
     */
    @Field(type = FieldType.Auto)//自动检测类型
    private String movieType;

    /**
     * 语言版本
     */
    @Field(type = FieldType.Auto)//自动检测类型
    private String movieLanguage;

    /**
     * 电影地区
     */
    @Field(type = FieldType.Auto)//自动检测类型
    private String movieArea;

    /**
     * 电影时长
     */
    @Field(type = FieldType.Date,format = DateFormat.custom,pattern = "HH:mm:ss")
    private LocalTime movieDuration;

    /**
     * 电影上映时间
     */
    @Field(type = FieldType.Date,format = DateFormat.date)//自动检测类型
    private LocalDate movieOpenhours;

    /**
     * 上映地区
     */
    private String movieShowArea;

    /**
     * 电影图片
     */
    @Field(type = FieldType.Auto)//自动检测类型
    private String moviePicture;

    /**
     * 电影状态
     */
    private Integer movieStatus;

    private LocalDateTime movieCreateTime;

    private LocalDateTime movieUpdateTime;

    private Integer movieVersion;

    private String orther1;

    private String orther2;

    public Integer getMovieId() {
        return movieId;
    }

    public void setMovieId(Integer movieId) {
        this.movieId = movieId;
    }
    public String getMovieCname() {
        return movieCname;
    }

    public void setMovieCname(String movieCname) {
        this.movieCname = movieCname;
    }
    public String getMovieEname() {
        return movieEname;
    }

    public void setMovieEname(String movieEname) {
        this.movieEname = movieEname;
    }
    public String getMovieType() {
        return movieType;
    }

    public void setMovieType(String movieType) {
        this.movieType = movieType;
    }
    public String getMovieLanguage() {
        return movieLanguage;
    }

    public void setMovieLanguage(String movieLanguage) {
        this.movieLanguage = movieLanguage;
    }
    public String getMovieArea() {
        return movieArea;
    }

    public void setMovieArea(String movieArea) {
        this.movieArea = movieArea;
    }
    public LocalTime getMovieDuration() {
        return movieDuration;
    }

    public void setMovieDuration(LocalTime movieDuration) {
        this.movieDuration = movieDuration;
    }
    public LocalDate getMovieOpenhours() {
        return movieOpenhours;
    }

    public void setMovieOpenhours(LocalDate movieOpenhours) {
        this.movieOpenhours = movieOpenhours;
    }
    public String getMovieShowArea() {
        return movieShowArea;
    }

    public void setMovieShowArea(String movieShowArea) {
        this.movieShowArea = movieShowArea;
    }
    public String getMoviePicture() {
        return moviePicture;
    }

    public void setMoviePicture(String moviePicture) {
        this.moviePicture = moviePicture;
    }
    public Integer getMovieStatus() {
        return movieStatus;
    }

    public void setMovieStatus(Integer movieStatus) {
        this.movieStatus = movieStatus;
    }
    public LocalDateTime getMovieCreateTime() {
        return movieCreateTime;
    }

    public void setMovieCreateTime(LocalDateTime movieCreateTime) {
        this.movieCreateTime = movieCreateTime;
    }
    public LocalDateTime getMovieUpdateTime() {
        return movieUpdateTime;
    }

    public void setMovieUpdateTime(LocalDateTime movieUpdateTime) {
        this.movieUpdateTime = movieUpdateTime;
    }
    public Integer getMovieVersion() {
        return movieVersion;
    }

    public void setMovieVersion(Integer movieVersion) {
        this.movieVersion = movieVersion;
    }
    public String getOrther1() {
        return orther1;
    }

    public void setOrther1(String orther1) {
        this.orther1 = orther1;
    }
    public String getOrther2() {
        return orther2;
    }

    public void setOrther2(String orther2) {
        this.orther2 = orther2;
    }

    @Override
    public String toString() {
        return "Movie{" +
            "movieId=" + movieId +
            ", movieCname=" + movieCname +
            ", movieEname=" + movieEname +
            ", movieType=" + movieType +
            ", movieLanguage=" + movieLanguage +
            ", movieArea=" + movieArea +
            ", movieDuration=" + movieDuration +
            ", movieOpenhours=" + movieOpenhours +
            ", movieShowArea=" + movieShowArea +
            ", moviePicture=" + moviePicture +
            ", movieStatus=" + movieStatus +
            ", movieCreateTime=" + movieCreateTime +
            ", movieUpdateTime=" + movieUpdateTime +
            ", movieVersion=" + movieVersion +
            ", orther1=" + orther1 +
            ", orther2=" + orther2 +
        "}";
    }
}
